import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/login',
      name: 'Login',
      component: () => import('../pages/Login.vue')
    },
    {
      path: '/register',
      name: 'Register',
      component: () => import('../pages/Register.vue')
    },
    {
      path: '/',
      name: 'Index',
      component: () => import('../pages/Index.vue'),
      children: [
        {
          path: 'welcome',
          name: 'Welcome',
          component: () => import('../pages/Welcome.vue')
        },
        {
          path: 'supplierRegister',
          name: 'SupplierRegister',
          component: () => import('../pages/SupplierRegister.vue')
        },
        {
          path: 'supplierChange',
          name: 'SupplierChange',
          component: () => import('../pages/SupplierChange.vue')
        },
        {
          path: 'supplierQuery',
          name: 'SupplierQuery',
          component: () => import('../pages/SupplierQuery.vue')
        },
        {
          path: 'supplierList',
          name: 'SupplierList',
          component: () => import('../pages/SupplierList.vue')
        },
        {
          path: 'order',
          name: 'Order',
          component: () => import('../pages/Order.vue')
        },
        {
          path: 'productionSchedule',
          name: 'ProductionSchedule',
          component: () => import('../pages/ProductionSchedule.vue')
        },
        {
          path: 'schedule',
          name: 'Schedule',
          component: () => import('../pages/Schedule.vue')
        },
        {
          path: 'orderDetail',
          name: 'OrderDetail',
          component: () => import('../pages/OrderDetail.vue')
        },
        {
          path: 'qualityDetail',
          name: 'QualityDetail',
          component: () => import('../pages/QualityDetail.vue')
        },{
          path: 'quality',
          name: 'Quality',
          component: () => import('../pages/Quality.vue')
        },{
          path: 'warehouse',
          name: 'Warehouse',
          component: () => import('../pages/Warehouse.vue')
        },
        {
          path: 'warehouseQuery',
          name: 'WarehouseQuery',
          component: () => import('../pages/WarehouseQuery.vue')
        },
        {
          path: 'logistics',
          name: 'Logistics',
          component: () => import('../pages/Logistics.vue')
        },
        {
          path: 'delivery',
          name: 'Delivery',
          component: () => import('../pages/Delivery.vue')
        },
        {
          path: 'purchase',
          name: 'Purchase',
          component: () => import('../pages/Purchase.vue')
        },
        {
          path: 'finance',
          name: 'Finance',
          component: () => import('../pages/Finance.vue')
        }
      ]
    },

  ]
})
